<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="${servicePackageName}.mapper.business.BusinessDatascopeExampleMapper">

	<select id="getBusiness" parameterType="${servicePackageName}.qo.business.DataScopeTestQo" resultType="${servicePackageName}.entity.business.BusinessDatascopeExample">
		SELECT *  FROM business_datascope_example b
		<#noparse>
		<where>
			<if test="param.bName != null and param.bName != ''">
        		 LOCATE(#{param.bName},b.b_name) 
    		</if>
    		<if test="param.bCode != null and param.bCode != ''">
        		AND LOCATE(#{param.bCode},b.b_code) 
    		</if>
    		<if test="param.sql != null and param.sql != ''">
        		AND ${param.sql}
    		</if>
		</where>
		</#noparse>
	</select>
</mapper>
